home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2802 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  822 b 

  1. Path: vixen.cso.uiuc.edu!usenet
  2. From: HOTARD <jhotard>
  3. Newsgroups: comp.lang.c
  4. Subject: Basic Question on SWITCH
  5. Date: 24 Jan 1996 04:35:16 GMT
  6. Organization: University of Illinois at Urbana
  7. Message-ID: <4e4cu4$95f@vixen.cso.uiuc.edu>
  8. NNTP-Posting-Host: sparc36.cs.uiuc.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4c)
  13. X-URL: news:comp.lang.c
  14.  
  15. I am just learning how to program in C, and I had a question about switch.
  16. I am writing a program that looks at a character and then determines if it is a
  17. letter or number.  This program must use the switch command , can I place a
  18. range on the case command somehow??
  19.  
  20. ie:  Switch (var)
  21.     case 0-9:
  22.  
  23. or case (isdigit):  
  24.  
  25. would anything like this work???
  26.  
  27. Thanks in advance
  28.  
  29. Justin
  30.  
  31.